package com.itheima.text2;

public class Text1 {
    public static void main(String[] args) {
        goSwimming1(new Swimming1() {
            @Override
            public void swim() {
                System.out.println("洗浴中心");
            }
        });

        goSwimming1(()->System.out.println("洗浴中心!!"));

    }
    public static void goSwimming1(Swimming1 s){
        s.swim();
    }
}


interface Swimming1{
    void swim();
}